package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzSheet;
import com.shop.pojo.LdbzSheetAssign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminSheetFeign {

    //修改板块页面跳转
    @RequestMapping(value = "/admin/sheet/service/editSheet/{id}",method = RequestMethod.GET)
    LdbzResult editSheet(@RequestParam("id") long id);

    //获取商品板块信息
    @RequestMapping(value = "/admin/sheet/service/getSheetList",method = RequestMethod.GET)
    LdbzResult getSheetList(@RequestParam("entity") LdbzSheet entity);

    //分页获取产品模块
    @RequestMapping(value = "/admin/sheet/service/getSheetPage",method = RequestMethod.GET)
    LdbzResult getSheetPage(@RequestParam("entity") LdbzSheet entity,@RequestParam("page")int page,@RequestParam("limit") int limit);

    //修改商品模块
    @RequestMapping(value = "/admin/sheet/service/updateByKey",method = RequestMethod.GET)
    LdbzResult updateByKey(@RequestParam("entity") LdbzSheet entity);

    //板块分配商品页跳转
    @RequestMapping(value = "/admin/sheet/service/assignSheet/{id}",method = RequestMethod.GET)
    LdbzResult assignSheet(@RequestParam("id") long id);

    //获取板块分配商品的信息
    @RequestMapping(value = "/admin/sheet/service/getSheetAssignList/{id}",method = RequestMethod.GET)
    LdbzResult getSheetAssignList(@RequestParam("sheetId") long sheetId);

    //删除分配的商品
    @RequestMapping(value = "/admin/sheet/service/deleteAssign/{id}",method = RequestMethod.GET)
    LdbzResult deleteAssign(@RequestParam("id")String id);

    //板块分配商品
    @RequestMapping(value = "/admin/sheet/service/addAssign",method = RequestMethod.GET)
    LdbzResult addAssign(@RequestParam("entity") LdbzSheetAssign entity);

    @RequestMapping(value = "/admin/sheet/service/countAdminUser",method = RequestMethod.GET)
    LdbzResult countAdminUser(@RequestParam("entity") LdbzSheetAssign entity);
}
